package com.datax.web.mail;

import javax.mail.Address;
import javax.mail.internet.InternetAddress;


public class test{

//	public static void main(String[] args) throws Exception {
//		test.SendMailUtilTest();
//	}

	public static void SendMailUtilTest() throws Exception
	{
		MailVo mailVo = new MailVo();
		mailVo.setSubject("综资-基表数据稽核以及预警信息统计表");
		StringBuilder content = new StringBuilder();
		content.append("<!DOCTYPE html>");
		content.append("<html>");
		content.append("<head>");
		content.append("<meta charset=\"utf-8\"> ");
		content.append("<title>Bootstrap 实例 - 面板标题</title>");
		content.append("<style>");
		content.append("html {");
		content.append("    height: 100%;  ");
		content.append("}");
		content.append("body {");
		content.append("    height: 100%");
		content.append("}");
		content.append(".main_container{");
		content.append("    height: inherit;");
		content.append("}");
		content.append(".panel-default{border-color:#ddd}.panel{margin-bottom:10px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}div{display:block}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-body{padding:15px}.table-bordered{border:1px solid #ddd}.table{width:100%;max-width:100%;margin-bottom:20px}table{background-color:transparent}table{border-spacing:0;border-collapse:collapse}thead{display:table-header-group;vertical-align:middle;border-color:inherit}");
		content.append("</style>");
		content.append("</head>");
		content.append("<body>");

		content.append("<div class=\"main_container\">");
		content.append("<div class=\"panel panel-default\">");
		content.append("<div class=\"panel-heading\">");
		content.append("综资预警数据-KUDU率小于99.9%以及大于100%");
		content.append("</div>");
		content.append("<div class=\"panel-body\">");
		content.append("</div>");
		content.append("</div>");
		content.append("</div>");
		content.append("</div>");
		content.append("</body>");
		content.append("</html>");

		mailVo.setMessageContext(content.toString());
		mailVo.setRecipientTo(new Address[]{new InternetAddress("yang.bo17@iwhalecloud.com "),
				new InternetAddress("liu.chuan2@iwhalecloud.com")
				,new InternetAddress("caoxiaobo.sh@chinatelecom.cn")});
		mailVo.setRecipientCc(new Address[]{new InternetAddress("787827967@qq.com")});
		SendMailUtil.sendMail(mailVo);
	}
}
